// router.js
import Vue from 'vue';
import Router from 'vue-router';

// 引入页面组件
import Index from '@/App.vue';
import fillTemplate from '@/views/pc/template/fillTemplate.vue';
import Home from '@/components/HelloWorld.vue';

Vue.use(Router);

const routes = [
    {
        path: '/pc',
        name: 'pc',
        component: Index,
        children:[
            {
                path: 'fillTemplate',
                name: 'fillTemplate',
                component: fillTemplate
            }
        ]
    },
    {
        path: '/about',
        name: 'About',
        component: Home
    }
];

const router = new Router({
    routes, // 路由规则
    mode: 'history' // 使用 HTML5 history 模式（可选）
});

export default router;
